package cn.yunhe.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import cn.yunhe.dao.EmpDao;
import cn.yunhe.entity.Emp;
import cn.yunhe.util.SqlSessionFactoryUtil;

public class Demo {
	
	@Test
	public void hello(){
		SqlSession session = SqlSessionFactoryUtil.getSession();
		EmpDao empDao = session.getMapper(EmpDao.class);
		List<Emp>list = empDao.searchAll();
		
		for(Emp emp : list){
			System.out.println(emp.getEmpNo()+","+emp.getEmpName());
		}

	}

}
